<%-- 
    Document   : index
    Created on : Apr 15, 2012, 10:10:30 AM
    Author     : tieurongtien
--%>

<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Hotel Manager</title>
    </head>
    <body>
        <div class="main">
            <!-- Header -->
            <jsp:include page="Pages/header.jsp" />

            <!-- Main Content-->
            <div class="main-content">

                <!-- Panel's content-->
                <div class="left-panel box">
                    <img class="avatar imagedropshadow" src="Images/avatar.jpg" />
                    <a class="button small pink" href="#">My button</a>
                    <form>
                        <button type="submit" title="submit">Submit</button>
                    </form>        
                </div>

                <!-- Main content-->
                <div class="content box float-right" >
                    <%@page import="Helpers.*" %>
                    <%@page import="Models.*" %>
                    
                    <% 
                    UserHelper helper=new UserHelper();
                    ArrayList<UserModel> users= helper.GetAllUsers();
                    %>
                    <table>
                        <th>
                            <td>Username</td>
                            <td>Email</td>
                        </th>
                        <%
                        for (int i=0;i<users.size();i++){ %>
                            <tr>
                                <td><%=users.get(i).getUsername()%> </td>
                                <td><%=users.get(i).getEmail()%> </td>
                            </tr>
                        <%}
                        %>
                        
                    </table>
                </div>                                              

            </div>
        </div>

        <!-- Footer-->
        <jsp:include page="Pages/footer.jsp" />
    </div>
</body>
</html>
